<%--
  Created by IntelliJ IDEA.
  User: DELL
  Date: 2020/11/8
  Time: 20:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>login</title>
    <style>
        body{
            padding: 0;
        }
        .all{
            width: 1250px;
            height: 200px;
        }
        .all .welcome,.alllist{
            width: 100%;
            height: 100px;
        }
        .all .welcome .adminxx,.wenzi{
            height: 50px;
            padding-left: 30px;
            line-height: 50px;
        }
        .all .welcome .wenzi{
            padding-left: 50px;
        }
        .all .welcome .adminxx{
            font-size: 30px;
        }
        .all .welcome .wenzi{
            font-size: 20px;
        }
        .alllist{
            width: 530px;
            height: 90px;
            display: flex;
            justify-content: space-around;
        }
        .list{
            width: 80px;
            height: 90px;
            display: block;
            text-decoration: none;
            color: black;
            border: 2px solid #ccc;
            border-radius: 10px;
        }
        .list:hover{
            border: 2px solid #4aa3d6;
            color: #4aa3d6;
            font-weight: 600;
        }
        .list-img{
            width: 60px;
            height: 60px;
            margin: 0 auto;
        }
        .mydata{
            background: url("./sc/selfxx.png") no-repeat;
            background-position: 5px 5px;
        }
        .passxg{
            background: url("./sc/mmxg.png") no-repeat;
            background-position: 5px 5px;
        }
        .cx{
            background: url("./sc/cx.png") no-repeat;
            background-position: 5px 5px;
        }
        .fbgg{
            background: url("./sc/fbgg.png") no-repeat;
            background-position: 5px 5px;
        }
        .gobacko{
            background: url("./sc/tc.png") no-repeat;
            background-position: 5px 5px;
        }
        .list-weizi{
            width: 100%;
            height: 30px;
            line-height: 30px;
            text-align: center;
        }
    </style>
    <script src="/WebContent/JQuery/jquery-3.4.1.js" type="text/javascript"></script>
</head>
<body>
     <div class="all">
         <div class="welcome">
             <div class="adminxx">
                 您好，欢迎回来: &nbsp;&nbsp;&nbsp;<span id="uname"></span>
             </div>
             <script>
                 $(document).ready(function () {
                     $("#uname").html("${sessionScope.admin.adminUsername}").css({
                         "color":"red",
                         "font-family":"华文行楷"
                     })
                 })
             </script>
             <div class="wenzi">有什么需要帮您的？</div>
         </div>
         <div class="alllist">
             <a class="list" href="/SuperAdminServlet?type=getadmin" target="rightbottom">
                <div class="list-img mydata"></div>
                 <div class="list-weizi">
                     修改信息
                 </div>
             </a>
             <a class="list" href="/SuperAdminServlet?type=getadmin" target="rightbottom">
                 <div class="list-img passxg"></div>
                 <div class="list-weizi">
                     密码修改
                 </div>
             </a>
             <a class="list" href="/WebContent/HTML/SuperAdminPage/superadmin_user/selectuser.jsp" target="rightbottom">
                 <div class="list-img cx"></div>
                 <div class="list-weizi">
                     查询用户
                 </div>
             </a>
             <a class="list" href="/WebContent/HTML/SuperAdminPage/superadmin_state/glgonggao.jsp" target="rightbottom">
                 <div class="list-img fbgg"></div>
                 <div class="list-weizi">
                     管理公告
                 </div>
             </a>
             <a class="list" href="javascript:void(0);" id="tc">
                 <div class="list-img gobacko"></div>
                 <div class="list-weizi">
                     退出登录
                 </div>
             </a>
         </div>
     </div>
     <script>
         $(document).ready(function () {
             $("#tc").click(function () {
                 if(confirm("确认注销系统吗？")){
                     $.ajax({
                         url:"/AdminLoginServlet",
                         type:"get",
                         data:{"type":"tc"},
                         datatype:"text",
                         success:function (data) {
                             if(data == "1"){
                                 window.alert("注销成功！");
                                 parent.location.href = "/WebContent/HTML/AdminLogin.jsp";
                             }else if(data == "0"){
                                 window.alert("操作失败，请重新尝试！");
                             }
                         },
                         error:function (error) {
                             alert("系统繁忙，请稍后再试！");
                         }
                     })
                 }

             })
         })
     </script>
</body>
</html>